home *** CD-ROM | disk | FTP | other *** search
-
- #if defined(FabSystem7orlater)
-
- #define FabFSpOpenResFile FSpOpenResFile
- #define FabFSpCreate FSpCreate
- #define FabFSpOpenDF FSpOpenDF
- #define FabFSpDelete FSpDelete
- #define FabStandardGetFile StandardGetFile
- #define FabStandardPutFile StandardPutFile
-
- #else
-
- #include "Utils6.h"
-
- #endif
-
-
- /*pascal OSErr SetLabel(short labelNumber, const RGBColor *, ConstStr255Param)
- = {0x303C, 0x050C, 0xABC9};
- */
- /*#pragma parameter __D0 PBEjectAsync(__A0)
- pascal OSErr PBEjectAsync(ParmBlkPtr paramBlock)
- = 0xA417;
- */
- /* Returns a pointer to the Dialog Manager’s standard dialog filter
- pascal OSErr GetStdFilterProc(ModalFilterProcPtr *theProc )
- = { 0x303C, 0x0203, 0xAA68 };
- */
- /* Indicates to the Dialog Manager which item is default. Will then alias the return */
- /* & enter keys to this item, and also bold border it for you (yaaaaa!)
- pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, short newItem)
- = { 0x303C, 0x0304, 0xAA68 };
- */
- /* Indicates which item should be aliased to escape or Command - .
- pascal OSErr SetDialogCancelItem(DialogPtr theDialog, short newItem)
- = { 0x303C, 0x0305, 0xAA68 };
- */
- /* Tells the Dialog Manager that there is an edit line in this dialog, and */
- /* it should track and change to an I-Beam cursor when over the edit line
- pascal OSErr SetDialogTracksCursor(DialogPtr theDialog, Boolean tracks)
- = { 0x303C, 0x0306, 0xAA68 };
- */
- #define topLeft(r) (((Point *) &(r))[0])
- #define botRight(r) (((Point *) &(r))[1])
-
- //pascal Boolean OSSTDFILTERPROC(DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
-
- /* a little bit of work Apple should have done in the first place in the headers */
-
- /*#pragma parameter __D0 MySetApplLimit(__A0)
- pascal short MySetApplLimit(void *zoneLimit)
- = 0xA02D;
- */
- /*#pragma parameter __D0 MyDelay(__A0)
- pascal long MyDelay(long numTicks)
- = {0xA03B};
- */
- #if USES68KINLINES
- #pragma parameter MyNumToString(__D0,__A0)
- extern pascal void MyNumToString(long theNum,Str255 theString)
- TWOWORDINLINE(0x4267, 0xA9EE);
- #else
- #define MyNumToString NumToString
- #endif
-
- /*#pragma parameter __D0 MyStringToNum(__A0)
- pascal long MyStringToNum(ConstStr255Param theString) = {0x3F3C, 0x0001, 0xA9EE };
- */
- /*#pragma parameter __D0 FabDate2Secs(__A0)
- pascal long FabDate2Secs(const DateTimeRec *date)
- = _Date2Secs;
- */
- /*pascal long FabSndSoundManagerVersion(void)
- = {0x203C,0x000C,0x0008,0xA800};
- */
- /* WantThisHandleSafe locks high the handle and returns the previous state */
-
- #if defined(powerc) || defined (__powerc)
- SignedByte WantThisHandleSafe(Handle myH);
- #else
- #pragma parameter __D0 WantThisHandleSafe(__A0)
- extern pascal SignedByte WantThisHandleSafe(Handle myH) = {0xA069, 0x1F00, 0xA064, 0xA029, 0x101F};
- #endif
-
- /* ClearHiliteMode clears the HiliteMode bit with BCLR */
-
- /*pascal void ClearHiliteMode(void) = {0x08B8, 0x0007, 0x0938};
- */
-
- #define numOfLongs(s) (((s)>>2) - 1L)
-
- #if defined(powerc) || defined (__powerc)
- void MyZeroBuffer(long *p, long s);
- void MyFillBuffer(long *p, long s, long filler);
- long mySwap(long s);
- #else
- #pragma parameter MyZeroBuffer(__A0,__D1)
- extern pascal void MyZeroBuffer(long *p, long s) = {0x7000, 0x20C0, 0x51C9, 0xFFFC };
-
- #pragma parameter MyFillBuffer(__A0,__D1,__D0)
- extern pascal void MyFillBuffer(long *p, long s, long filler) = {0x20C0, 0x51C9, 0xFFFC };
-
- #pragma parameter __D0 mySwap(__D0)
- extern pascal long mySwap(long s) = {0x4840 };
- #endif
-
-
- /*#pragma parameter __D0 Ext12(__D0)
- pascal short Ext12(short s) = {0xE948, 0xE840 };
-
- #pragma parameter __D0 Ext11(__D0)
- pascal short Ext11(short s) = {0xEB48, 0xEA40 };
- */
-
- #define CHARFROMMESSAGE(mess) (*(((unsigned char *)(&(mess))) + 3))
-
- #define MAX(a, b) ((a) > (b) ? (a) : (b))
- #define MIN(a, b) ((a) < (b) ? (a) : (b))
-
- /* strings */
- enum simplestrings {
- kSTR_NOOPENORPRINT = -16397,
- kSTR_ApplicationName = -16396
- };
-
- enum {
- kEscapeKey = 0x351B
- };
-
- /* for KeyState */
- enum {
- kCommandKeyCode = 55,
- kShiftKeyCode,
- kCapsLockKeyCode,
- kOptionKeyCode,
- kControlKeyCode
- };
-
- enum {
- kWantRestart = false,
- kWantShutdown = true
- };
-
- enum {
- kCreat = 'FABR',
- kAEAlert = 'ALRT'
- };
-
- enum {
- kSTR_RegDECALLOWED = 302,
- kDLOG_Register = 300,
- kALRT_REGCANNOTREPLACE = 201,
- kALRT_REGSUCCESSSAVED = 202,
- kALRT_REGDISKFULL = 203,
- kALRT_REGUNKNOWNWRITEERROR = 204,
- kALRT_REGCOULDNOTOPENFORWRITING = 205,
- kALRT_REGCOULDNOTCREATE = 206,
- kItemUserName = 3,
- kItemCompany,
- kItemAddress,
- kItemCity,
- kItemState,
- kItemZIP,
- kItemCountry,
- kItemE_mail,
- kItemPhone,
- kItemFAX,
- kItemQuantity,
- kItemCopyFrom,
- kItemComments,
- kItemTotals = 28
- };
-
- OSErr AddSTRRes2Doc(FSSpec *theDoc, OSType myFcrea, OSType myFtype, short STRid, ScriptCode lScript);
- OSErr AddSTRHand2Doc(FSSpec *theDoc, OSType myFcrea, OSType myFtype, StringHandle msgString, ScriptCode lScript);
- OSErr AddRes2Doc(FSSpec *theDoc, Handle thisHandle, ResType rType, short rID);
- void SendmyAE(AEEventClass, AEEventID myAEvtID, AEIdleProcPtr, AESendMode theMode);
- void SendmyAEPShort(AEEventClass myclass, AEEventID myAEvtID, AEIdleProcPtr IdleFunct, AESendMode theMode, short theAlert);
- void ZoomRectToRect(RectPtr startingRect, RectPtr endingRect, short numofDivs);
- void ZoomRectToRectAutoGrafPort(RectPtr startingRect, RectPtr endingRect, short numofDivs);
- Handle NewHandleGeneral(Size blockSize);
- Handle Get1ResGeneral(ResType theType, short theID);
- OSType FindFinderAtEaseProcess(ProcessSerialNumber *);
- OSType FindFinderProcess(void);
- OSErr SendShutdownToFinder(AEIdleProcPtr, Boolean);
- short StopAlert_UPP(short alertID, ModalFilterProcPtr filterProc);
- short StopAlert_AE(short alertID, ModalFilterProcPtr filterProc, AEIdleProcPtr IdleFunct);
- short CautionAlert_UPP(short alertID, ModalFilterProcPtr filterProc);
- short CautionAlert_AE(short alertID, ModalFilterProcPtr filterProc, AEIdleProcPtr IdleFunct);
- short NoteAlert_UPP(short alertID, ModalFilterProcPtr filterProc);
- short NoteAlert_AE(short alertID, ModalFilterProcPtr filterProc, AEIdleProcPtr IdleFunct);
- short Alert_UPP(short alertID, ModalFilterProcPtr filterProc);
- short Alert_AE(short alertID, ModalFilterProcPtr filterProc, AEIdleProcPtr IdleFunct);
-
- typedef struct {
- FSSpec destFile;
- ScriptCode theScript;
- } StdFileResult, *StdFileResultPtr;
-
- /* dialog box manager */
-
- struct dialogitems {
- short itemNumber;
- short group;
- long refCon;
- };
-
- typedef struct dialogitems dialogItems, *dialogItemsPtr;
-
- void FlashButton(DialogPtr dlg, short item);
- void OutlineButton(DialogPtr oftheDialog, short myItem);
-
- short HandleDialog(ModalFilterProcPtr filterProc,
- dialogItemsPtr things,
- void (*initProc)(DialogPtr),
- void (*userProc)(DialogPtr, Handle, short),
- short resId);
-
- /* about box manager */
-
- void myAbout(void (*theIdleProc)(void),
- UserItemUPP DrawQTPict,
- void (*UpdateProc)(EventRecord *),
- void (*ActivateProc)(EventRecord *)
- );
- Handle OpenSplash(DialogPtr *, UserItemUPP DrawQTPict);
- void DisposeSplash(Handle, DialogPtr);
-
- Boolean GetFontNumber(ConstStr255Param fontName, short *fontNum);
- OSErr TickleParent( FSSpec *child );
- Boolean CmdPeriod(EventRecord *theEvent);
- Boolean CmdPeriodOrEsc(EventRecord *theEvent);
- Boolean CmdPeriodOrEscConfirm(EventRecord *theEvent, short alertID, ModalFilterProcPtr filterProc);
- void HandleRegistration(ModalFilterProcPtr filterProc,
- long (*regCfgInfo)(Handle, long, StringPtr),
- short dollars);
- void RegInitProc(DialogPtr myDPtr);
- OSErr AskForDestFile(StdFileResultPtr whichFile, Ptr prompt, Ptr docName);
- void BCDVersNumToString(long num, StringPtr str);
- void BCDLongVersNumToString(long num, StringPtr str);
- Boolean TrapAvailable(short theTrap);
- OSErr InstallRequiredAEHandlers(AEEventHandlerProcPtr myOAPP,
- AEEventHandlerProcPtr myODOC,
- AEEventHandlerProcPtr myPDOC,
- AEEventHandlerProcPtr myQUIT);
-
-